<div class="container-fluid">
  <div class="row">
    <div class="col-sm-2">
      <%= render "shared/sidenav" %>

    </div>
    <div class="col-sm-10">
      <div class="panel panel-primary">
        <div class="panel-heading">
          <h3 class="panel-title">选修课程</h3>
        </div>
        <div class="panel-body" style="min-height: 450px">
          <table class="table table-striped table-hover">
            <thead>

            <tr>
              <th>课程编号</th>
              <th>课程名称</th>
              <th>课时/学分</th>
              <th>限选</th>
              <th>已选</th>
              <th>课程属性</th>
              <th>授课方式</th>
              <th>考试方式</th>
              <th>主讲教师</th>

            </tr>
            </thead>
            <tbody>

            <% @courses.each do |course| %>
                <tr>

                  <td><%= course.course_code %></td>
                  <td><%= course.name %></td>
                  <td><%= course.credit %></td>
                  <td><%= course.limit_num %></td>
                  <td><%= course.student_num %></td>
                  <td><%= course.course_type %></td>
                  <td><%= course.teaching_type %></td>
                  <td><%= course.exam_type %></td>
                  <td><%= course.teacher.name %></td>
                  <td><%= link_to "加入课程", select_course_path(course), class: 'btn-sm btn-info' %></td>

                </tr>
            <% end %>
            </tbody>
          </table>
          <%= will_paginate @courses %>
        </div>
      </div>
    </div>
  </div>
</div>


